package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"king/api/internal/config"
	"king/kingrpc/kingrpcclient"
)

type ServiceContext struct {
	Config  config.Config
	KingRpc kingrpcclient.Kingrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		KingRpc: kingrpcclient.NewKingrpc(zrpc.MustNewClient(c.KingRpc)),
	}
}
